package com.feige.constant;

/**
 * @author feige
 */
public interface Constants {

    /**
     * 枚举状态码和提示信息
     */
    int SUCCESS_STATUS = 0;
    int FAILURE_STATUS = 1;
    String SUCCESS_CODE = "0000";
    String FAILURE_CODE = "1111";
    String NO_AUTH_CODE = "401";
    String NO_DATA_CODE = "404";
    String SUCCESS_MSG = "SUCCESS";
    String FAILURE_MSG = "FAILURE";
    String NO_AUTH_MSG = "NO AUTH";
    /**
     * jwt秘钥
     */
    String APP_SECRET = "ukc8BDbRigUDaY6pZFfWus2jZWLPHO";
    /**
     * token
     */
    String TOKEN_KEY = "Authentication";
    String TOKEN_PREFIX = "Bearer";
    Long TOKEN_EXPIRE = 2 * 60 * 60L;
    // 小于50分钟时刷新token
    Long REFRESH_TOKEN_DURATION = 5 * 60L;
    /**
     * 登录用户key
     */
    String LOGIN_USER_KEY = "login_user:";
    /**
     * 验证码key,验证码过期时间
     */
    String CAPTCHA_CODE_KEY = "captcha:";
    long CAPTCHA_CODE_EXPIRE = 5 * 60L;
    String EMAIL_CODE_KEY = "email:";

    /**
     * key过期时间
     */
    long KEY_EXPIRE = TOKEN_EXPIRE / 2;

    /**
     * token过期相差小于20分钟则刷新缓存
     */
    long TWENTY_MINUTE = 20 * 60L;

    /**
     * 允许上传图片和语音格式
     */
    String[] OFFICE_FILE_TYPE = {"pdf","doc","docx","ppt","pptx","xls","xlsx"};
    String[] IMG_TYPE = {"png", "jpg", "jpeg", "webp", "gif"};
    String[] BASE64_TYPE = {"data:image/jpeg;","data:image/x-icon;","data:image/gif;","data:image/png;"};
    String BLOB = "BLOB";
    String[] VOICE_TYPE = {"mp3"};
    String[] AUDIO_TYPE = {"mp4"};
    String PDF_TYPE = "pdf";
    String[] EXCEL_TYPE = {"xls","xlsx"};
    String[] WORD_TYPE = {"docx","ppt"};
    String[] PPT_TYPE = {"ppt","pptx"};
    String HTML_TYPE = "html";
    String TXT_TYPE = "txt";
    String MD_TYPE = "md";
    String[] ZIP_TYPE = {"zip","jar","rar"};




}

